<%@ page language="java" contentType="text/html; utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>用户主页</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  <link rel="stylesheet" href="/fly-3.0/res/layui/css/layui.css">
  <link rel="stylesheet" href="/fly-3.0/res/css/global.css">
</head>
<body style="margin-top: 65px;">

<%@include file="../common/header.jsp"%>

<div class="fly-home fly-panel" style="background-image: url();">
  <img src="${user.userHeadImage}" alt="贤心">
  <i class="iconfont icon-renzheng" title="Fly社区认证"></i>
    <h1>
    ${user.userName}
    <c:if test="${user.userSex==1}">
        <i class="iconfont icon-nan"></i>
    </c:if>
    <c:if test="${user.userSex==0}">
        <i class="iconfont icon-nv"></i>
    </c:if>

    <%--<i class="layui-badge fly-badge-vip">VIP3</i>--%>

    <span style="color:#c00;">（${user.role.roleName}）</span>
        <!--
    <span style="color:#5FB878;">（社区之光）</span>
    <span>（该号已被封）</span>
    -->
  </h1>

  <p style="padding: 10px 0; color: #5FB878;">认证信息：layui 作者</p>

  <p class="fly-home-info">
    <i class="iconfont icon-kiss" title="飞吻"></i><span style="color: #FF7200;">66666 飞吻</span>
    <i class="iconfont icon-shijian"></i><span>
    <f:formatDate pattern="yyyy-MM-dd" value="${user.userRegisterDate}" /> 加入</span>
    <i class="iconfont icon-chengshi"></i><span>来自${user.userCity}</span>
  </p>

  <p class="fly-home-sign">签名:${user.userSign}</p>

  <%--<div class="fly-sns" data-user="">--%>
    <%--<a href="javascript:;" class="layui-btn layui-btn-primary fly-imActive" data-type="addFriend">加为好友</a>--%>
    <%--<a href="javascript:;" class="layui-btn layui-btn-normal fly-imActive" data-type="chat">发起会话</a>--%>
  <%--</div>--%>

</div>

<div class="layui-container">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md6 fly-home-jie">
      <div class="fly-panel">
        <h3 class="fly-panel-title">${user.userName} 最近的提问</h3>
        <ul class="jie-row">
          <c:choose>
              <c:when test="${!empty user.userArticles}">
                  <c:forEach var="article" items="${user.userArticles}">
                      <li>
                          <c:if test="${article.articleStar==1}">
                              <span class="fly-jing">精</span>
                          </c:if>
                          <a href="/article/${article.articleId}/" class="jie-title">${article.articleTitle}</a>
                          <i><f:formatDate value="${article.articleBuildDate}" pattern="yyyy-MM-dd"/></i>
                          <em class="layui-hide-xs">${article.articleClickNumber}阅读/${article.articleCommentNumber}答</em>
                      </li>
                  </c:forEach>
              </c:when>
              <c:otherwise>
                  <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><i style="font-size:14px;">没有发表任何求解</i></div>
              </c:otherwise>
          </c:choose>
          <%--<li>--%>
            <%--<span class="fly-jing">精</span>--%>
            <%--<a href="" class="jie-title"> 基于 layui 的极简社区页面模版</a>--%>
            <%--<i>刚刚</i>--%>
            <%--<em class="layui-hide-xs">1136阅/27答</em>--%>
          <%--</li>--%>
        </ul>
      </div>
    </div>
    
    <div class="layui-col-md6 fly-home-da">
      <div class="fly-panel">
        <h3 class="fly-panel-title">贤心 最近的回答</h3>
        <ul class="home-jieda">
          <li>
          <p>
          <span>1分钟前</span>
          在<a href="" target="_blank">tips能同时渲染多个吗?</a>中回答：
          </p>
          <div class="home-dacontent">
            尝试给layer.photos加上这个属性试试：
<pre>
full: true         
</pre>
            文档没有提及
          </div>
        </li>
        <li>
          <p>
          <span>5分钟前</span>
          在<a href="" target="_blank">在Fly社区用的是什么系统啊?</a>中回答：
          </p>
          <div class="home-dacontent">
            Fly社区采用的是NodeJS。分享出来的只是前端模版
          </div>
        </li>
        
          <!-- <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><span>没有回答任何问题</span></div> -->
        </ul>
      </div>
    </div>
  </div>
</div>

<%@include file="../common/footer.jsp"%>

</body>
</html>